package com.commbizobj.category;

/**
 * Represents a category.
 * You can add in more properties of your need, e.g. keywords, itemCount, etc.
 * 
 * The implementation for a unlimited hierarchical structured category.
 * (You can extract the hierarchical logic and use it for other implementations, e.g. forum posts.)
 * This class is backed by a DAO implementation.
 * 
 * The persistence layer implementation is based on this algorithm: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
 * 
 * @author Otacon
 *
 */
public class Category {
    private String id;
    private int level;  // 0 = root (virtual), 1 = 1st level categories, etc.
    private String name;
    
    // -- Getters and Setters --
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
	public void setLevel(int level) {
        this.level = level;
    }
    public int getLevel() {
        return level;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}
